0 Prolog
↳1 UndefinedPredicateHandlerProof (⇒, 0 ms)
↳2 Prolog
↳3 PrologToPiTRSProof (⇒, 63 ms)
↳4 PiTRS
↳5 DependencyPairsProof (⇔, 287 ms)
↳6 PiDP
↳7 DependencyGraphProof (⇔, 0 ms)
↳8 AND
↳9 PiDP
↳10 UsableRulesProof (⇔, 0 ms)
↳11 PiDP
↳12 PiDPToQDPProof (⇒, 0 ms)
↳13 QDP
↳14 QDPSizeChangeProof (⇔, 0 ms)
↳15 YES
↳16 PiDP
↳17 UsableRulesProof (⇔, 0 ms)
↳18 PiDP
↳19 PiDPToQDPProof (⇒, 15 ms)
↳20 QDP
↳21 QDPSizeChangeProof (⇔, 0 ms)
↳22 YES
↳23 PiDP
↳24 UsableRulesProof (⇔, 0 ms)
↳25 PiDP
↳26 PiDPToQDPProof (⇒, 0 ms)
↳27 QDP
↳28 QDPSizeChangeProof (⇔, 0 ms)
↳29 YES
↳30 PiDP
↳31 UsableRulesProof (⇔, 0 ms)
↳32 PiDP
↳33 PiDPToQDPProof (⇒, 0 ms)
↳34 QDP
↳35 MRRProof (⇔, 23 ms)
↳36 QDP
↳37 PisEmptyProof (⇔, 0 ms)
↳38 YES
queens_in_ga(X, Y) → U1_ga(X, Y, perm_in_ga(X, Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_ga(X, Y, perm_out_ga(X, Y)) → U2_ga(X, Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U8_ggg(X, F, T, N, =\=_out_gg(X, F)) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
U9_ggg(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_ggg(X, F, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_ggg(X, F, T, N, is_in_ag(N1, +(N, 1)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U11_ggg(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_ggg(X, F, T, N, noattack_in_gga(X, T, N1))
noattack_in_gga(X, [], N) → noattack_out_gga(X, [], N)
noattack_in_gga(X, .(F, T), N) → U8_gga(X, F, T, N, =\=_in_gg(X, F))
U8_gga(X, F, T, N, =\=_out_gg(X, F)) → U9_gga(X, F, T, N, =\=_in_ga(X, +(F, N)))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
U9_gga(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_gga(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_gga(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_gga(X, F, T, N, is_in_aa(N1, +(N, 1)))
is_in_aa(X0, X1) → is_out_aa(X0, X1)
U11_gga(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_gga(X, F, T, N, noattack_in_gga(X, T, N1))
U12_gga(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_gga(X, .(F, T), N)
U12_ggg(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, 1)) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_ga(X, Y, safe_out_g(Y)) → queens_out_ga(X, Y)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
queens_in_ga(X, Y) → U1_ga(X, Y, perm_in_ga(X, Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_ga(X, Y, perm_out_ga(X, Y)) → U2_ga(X, Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U8_ggg(X, F, T, N, =\=_out_gg(X, F)) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
U9_ggg(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_ggg(X, F, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_ggg(X, F, T, N, is_in_ag(N1, +(N, 1)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U11_ggg(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_ggg(X, F, T, N, noattack_in_gga(X, T, N1))
noattack_in_gga(X, [], N) → noattack_out_gga(X, [], N)
noattack_in_gga(X, .(F, T), N) → U8_gga(X, F, T, N, =\=_in_gg(X, F))
U8_gga(X, F, T, N, =\=_out_gg(X, F)) → U9_gga(X, F, T, N, =\=_in_ga(X, +(F, N)))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
U9_gga(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_gga(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_gga(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_gga(X, F, T, N, is_in_aa(N1, +(N, 1)))
is_in_aa(X0, X1) → is_out_aa(X0, X1)
U11_gga(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_gga(X, F, T, N, noattack_in_gga(X, T, N1))
U12_gga(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_gga(X, .(F, T), N)
U12_ggg(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, 1)) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_ga(X, Y, safe_out_g(Y)) → queens_out_ga(X, Y)
QUEENS_IN_GA(X, Y) → U1_GA(X, Y, perm_in_ga(X, Y))
QUEENS_IN_GA(X, Y) → PERM_IN_GA(X, Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_GA(X, Y, perm_out_ga(X, Y)) → U2_GA(X, Y, safe_in_g(Y))
U1_GA(X, Y, perm_out_ga(X, Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, 1))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, 1)
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, =\=_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → =\=_IN_GG(X, F)
U8_GGG(X, F, T, N, =\=_out_gg(X, F)) → U9_GGG(X, F, T, N, =\=_in_gg(X, +(F, N)))
U8_GGG(X, F, T, N, =\=_out_gg(X, F)) → =\=_IN_GG(X, +(F, N))
U9_GGG(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_GGG(X, F, T, N, =\=_in_gg(F, +(X, N)))
U9_GGG(X, F, T, N, =\=_out_gg(X, +(F, N))) → =\=_IN_GG(F, +(X, N))
U10_GGG(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_GGG(X, F, T, N, is_in_ag(N1, +(N, 1)))
U10_GGG(X, F, T, N, =\=_out_gg(F, +(X, N))) → IS_IN_AG(N1, +(N, 1))
U11_GGG(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_GGG(X, F, T, N, noattack_in_gga(X, T, N1))
U11_GGG(X, F, T, N, is_out_ag(N1, +(N, 1))) → NOATTACK_IN_GGA(X, T, N1)
NOATTACK_IN_GGA(X, .(F, T), N) → U8_GGA(X, F, T, N, =\=_in_gg(X, F))
NOATTACK_IN_GGA(X, .(F, T), N) → =\=_IN_GG(X, F)
U8_GGA(X, F, T, N, =\=_out_gg(X, F)) → U9_GGA(X, F, T, N, =\=_in_ga(X, +(F, N)))
U8_GGA(X, F, T, N, =\=_out_gg(X, F)) → =\=_IN_GA(X, +(F, N))
U9_GGA(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_GGA(X, F, T, N, =\=_in_ga(F, +(X, N)))
U9_GGA(X, F, T, N, =\=_out_ga(X, +(F, N))) → =\=_IN_GA(F, +(X, N))
U10_GGA(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_GGA(X, F, T, N, is_in_aa(N1, +(N, 1)))
U10_GGA(X, F, T, N, =\=_out_ga(F, +(X, N))) → IS_IN_AA(N1, +(N, 1))
U11_GGA(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_GGA(X, F, T, N, noattack_in_gga(X, T, N1))
U11_GGA(X, F, T, N, is_out_aa(N1, +(N, 1))) → NOATTACK_IN_GGA(X, T, N1)
U6_G(X, Y, noattack_out_ggg(X, Y, 1)) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, 1)) → SAFE_IN_G(Y)
queens_in_ga(X, Y) → U1_ga(X, Y, perm_in_ga(X, Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_ga(X, Y, perm_out_ga(X, Y)) → U2_ga(X, Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U8_ggg(X, F, T, N, =\=_out_gg(X, F)) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
U9_ggg(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_ggg(X, F, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_ggg(X, F, T, N, is_in_ag(N1, +(N, 1)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U11_ggg(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_ggg(X, F, T, N, noattack_in_gga(X, T, N1))
noattack_in_gga(X, [], N) → noattack_out_gga(X, [], N)
noattack_in_gga(X, .(F, T), N) → U8_gga(X, F, T, N, =\=_in_gg(X, F))
U8_gga(X, F, T, N, =\=_out_gg(X, F)) → U9_gga(X, F, T, N, =\=_in_ga(X, +(F, N)))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
U9_gga(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_gga(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_gga(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_gga(X, F, T, N, is_in_aa(N1, +(N, 1)))
is_in_aa(X0, X1) → is_out_aa(X0, X1)
U11_gga(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_gga(X, F, T, N, noattack_in_gga(X, T, N1))
U12_gga(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_gga(X, .(F, T), N)
U12_ggg(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, 1)) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_ga(X, Y, safe_out_g(Y)) → queens_out_ga(X, Y)
QUEENS_IN_GA(X, Y) → U1_GA(X, Y, perm_in_ga(X, Y))
QUEENS_IN_GA(X, Y) → PERM_IN_GA(X, Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_GA(X, Y, perm_out_ga(X, Y)) → U2_GA(X, Y, safe_in_g(Y))
U1_GA(X, Y, perm_out_ga(X, Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, 1))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, 1)
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, =\=_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → =\=_IN_GG(X, F)
U8_GGG(X, F, T, N, =\=_out_gg(X, F)) → U9_GGG(X, F, T, N, =\=_in_gg(X, +(F, N)))
U8_GGG(X, F, T, N, =\=_out_gg(X, F)) → =\=_IN_GG(X, +(F, N))
U9_GGG(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_GGG(X, F, T, N, =\=_in_gg(F, +(X, N)))
U9_GGG(X, F, T, N, =\=_out_gg(X, +(F, N))) → =\=_IN_GG(F, +(X, N))
U10_GGG(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_GGG(X, F, T, N, is_in_ag(N1, +(N, 1)))
U10_GGG(X, F, T, N, =\=_out_gg(F, +(X, N))) → IS_IN_AG(N1, +(N, 1))
U11_GGG(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_GGG(X, F, T, N, noattack_in_gga(X, T, N1))
U11_GGG(X, F, T, N, is_out_ag(N1, +(N, 1))) → NOATTACK_IN_GGA(X, T, N1)
NOATTACK_IN_GGA(X, .(F, T), N) → U8_GGA(X, F, T, N, =\=_in_gg(X, F))
NOATTACK_IN_GGA(X, .(F, T), N) → =\=_IN_GG(X, F)
U8_GGA(X, F, T, N, =\=_out_gg(X, F)) → U9_GGA(X, F, T, N, =\=_in_ga(X, +(F, N)))
U8_GGA(X, F, T, N, =\=_out_gg(X, F)) → =\=_IN_GA(X, +(F, N))
U9_GGA(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_GGA(X, F, T, N, =\=_in_ga(F, +(X, N)))
U9_GGA(X, F, T, N, =\=_out_ga(X, +(F, N))) → =\=_IN_GA(F, +(X, N))
U10_GGA(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_GGA(X, F, T, N, is_in_aa(N1, +(N, 1)))
U10_GGA(X, F, T, N, =\=_out_ga(F, +(X, N))) → IS_IN_AA(N1, +(N, 1))
U11_GGA(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_GGA(X, F, T, N, noattack_in_gga(X, T, N1))
U11_GGA(X, F, T, N, is_out_aa(N1, +(N, 1))) → NOATTACK_IN_GGA(X, T, N1)
U6_G(X, Y, noattack_out_ggg(X, Y, 1)) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, 1)) → SAFE_IN_G(Y)
queens_in_ga(X, Y) → U1_ga(X, Y, perm_in_ga(X, Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_ga(X, Y, perm_out_ga(X, Y)) → U2_ga(X, Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U8_ggg(X, F, T, N, =\=_out_gg(X, F)) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
U9_ggg(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_ggg(X, F, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_ggg(X, F, T, N, is_in_ag(N1, +(N, 1)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U11_ggg(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_ggg(X, F, T, N, noattack_in_gga(X, T, N1))
noattack_in_gga(X, [], N) → noattack_out_gga(X, [], N)
noattack_in_gga(X, .(F, T), N) → U8_gga(X, F, T, N, =\=_in_gg(X, F))
U8_gga(X, F, T, N, =\=_out_gg(X, F)) → U9_gga(X, F, T, N, =\=_in_ga(X, +(F, N)))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
U9_gga(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_gga(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_gga(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_gga(X, F, T, N, is_in_aa(N1, +(N, 1)))
is_in_aa(X0, X1) → is_out_aa(X0, X1)
U11_gga(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_gga(X, F, T, N, noattack_in_gga(X, T, N1))
U12_gga(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_gga(X, .(F, T), N)
U12_ggg(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, 1)) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_ga(X, Y, safe_out_g(Y)) → queens_out_ga(X, Y)
U8_GGA(X, F, T, N, =\=_out_gg(X, F)) → U9_GGA(X, F, T, N, =\=_in_ga(X, +(F, N)))
U9_GGA(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_GGA(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_GGA(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_GGA(X, F, T, N, is_in_aa(N1, +(N, 1)))
U11_GGA(X, F, T, N, is_out_aa(N1, +(N, 1))) → NOATTACK_IN_GGA(X, T, N1)
NOATTACK_IN_GGA(X, .(F, T), N) → U8_GGA(X, F, T, N, =\=_in_gg(X, F))
queens_in_ga(X, Y) → U1_ga(X, Y, perm_in_ga(X, Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_ga(X, Y, perm_out_ga(X, Y)) → U2_ga(X, Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U8_ggg(X, F, T, N, =\=_out_gg(X, F)) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
U9_ggg(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_ggg(X, F, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_ggg(X, F, T, N, is_in_ag(N1, +(N, 1)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U11_ggg(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_ggg(X, F, T, N, noattack_in_gga(X, T, N1))
noattack_in_gga(X, [], N) → noattack_out_gga(X, [], N)
noattack_in_gga(X, .(F, T), N) → U8_gga(X, F, T, N, =\=_in_gg(X, F))
U8_gga(X, F, T, N, =\=_out_gg(X, F)) → U9_gga(X, F, T, N, =\=_in_ga(X, +(F, N)))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
U9_gga(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_gga(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_gga(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_gga(X, F, T, N, is_in_aa(N1, +(N, 1)))
is_in_aa(X0, X1) → is_out_aa(X0, X1)
U11_gga(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_gga(X, F, T, N, noattack_in_gga(X, T, N1))
U12_gga(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_gga(X, .(F, T), N)
U12_ggg(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, 1)) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_ga(X, Y, safe_out_g(Y)) → queens_out_ga(X, Y)
U8_GGA(X, F, T, N, =\=_out_gg(X, F)) → U9_GGA(X, F, T, N, =\=_in_ga(X, +(F, N)))
U9_GGA(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_GGA(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_GGA(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_GGA(X, F, T, N, is_in_aa(N1, +(N, 1)))
U11_GGA(X, F, T, N, is_out_aa(N1, +(N, 1))) → NOATTACK_IN_GGA(X, T, N1)
NOATTACK_IN_GGA(X, .(F, T), N) → U8_GGA(X, F, T, N, =\=_in_gg(X, F))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
is_in_aa(X0, X1) → is_out_aa(X0, X1)
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U8_GGA(X, F, T, =\=_out_gg) → U9_GGA(X, F, T, =\=_in_ga(X))
U9_GGA(X, F, T, =\=_out_ga) → U10_GGA(X, T, =\=_in_ga(F))
U10_GGA(X, T, =\=_out_ga) → U11_GGA(X, T, is_in_aa)
U11_GGA(X, T, is_out_aa) → NOATTACK_IN_GGA(X, T)
NOATTACK_IN_GGA(X, .(F, T)) → U8_GGA(X, F, T, =\=_in_gg(X, F))
=\=_in_ga(X0) → =\=_out_ga
is_in_aa → is_out_aa
=\=_in_gg(X0, X1) → =\=_out_gg
=\=_in_ga(x0)
is_in_aa
=\=_in_gg(x0, x1)
From the DPs we obtained the following set of size-change graphs:
U6_G(X, Y, noattack_out_ggg(X, Y, 1)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, 1))
queens_in_ga(X, Y) → U1_ga(X, Y, perm_in_ga(X, Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_ga(X, Y, perm_out_ga(X, Y)) → U2_ga(X, Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U8_ggg(X, F, T, N, =\=_out_gg(X, F)) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
U9_ggg(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_ggg(X, F, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_ggg(X, F, T, N, is_in_ag(N1, +(N, 1)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U11_ggg(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_ggg(X, F, T, N, noattack_in_gga(X, T, N1))
noattack_in_gga(X, [], N) → noattack_out_gga(X, [], N)
noattack_in_gga(X, .(F, T), N) → U8_gga(X, F, T, N, =\=_in_gg(X, F))
U8_gga(X, F, T, N, =\=_out_gg(X, F)) → U9_gga(X, F, T, N, =\=_in_ga(X, +(F, N)))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
U9_gga(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_gga(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_gga(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_gga(X, F, T, N, is_in_aa(N1, +(N, 1)))
is_in_aa(X0, X1) → is_out_aa(X0, X1)
U11_gga(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_gga(X, F, T, N, noattack_in_gga(X, T, N1))
U12_gga(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_gga(X, .(F, T), N)
U12_ggg(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, 1)) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_ga(X, Y, safe_out_g(Y)) → queens_out_ga(X, Y)
U6_G(X, Y, noattack_out_ggg(X, Y, 1)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
U8_ggg(X, F, T, N, =\=_out_gg(X, F)) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U9_ggg(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_ggg(X, F, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_ggg(X, F, T, N, is_in_ag(N1, +(N, 1)))
U11_ggg(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_ggg(X, F, T, N, noattack_in_gga(X, T, N1))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U12_ggg(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_ggg(X, .(F, T), N)
noattack_in_gga(X, [], N) → noattack_out_gga(X, [], N)
noattack_in_gga(X, .(F, T), N) → U8_gga(X, F, T, N, =\=_in_gg(X, F))
U8_gga(X, F, T, N, =\=_out_gg(X, F)) → U9_gga(X, F, T, N, =\=_in_ga(X, +(F, N)))
U9_gga(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_gga(X, F, T, N, =\=_in_ga(F, +(X, N)))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
U10_gga(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_gga(X, F, T, N, is_in_aa(N1, +(N, 1)))
U11_gga(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_gga(X, F, T, N, noattack_in_gga(X, T, N1))
is_in_aa(X0, X1) → is_out_aa(X0, X1)
U12_gga(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_gga(X, .(F, T), N)
U6_G(Y, noattack_out_ggg) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
U8_ggg(X, F, T, N, =\=_out_gg) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
=\=_in_gg(X0, X1) → =\=_out_gg
U9_ggg(X, F, T, N, =\=_out_gg) → U10_ggg(X, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, T, N, =\=_out_gg) → U11_ggg(X, T, is_in_ag(+(N, 1)))
U11_ggg(X, T, is_out_ag) → U12_ggg(noattack_in_gga(X, T))
is_in_ag(X1) → is_out_ag
U12_ggg(noattack_out_gga) → noattack_out_ggg
noattack_in_gga(X, []) → noattack_out_gga
noattack_in_gga(X, .(F, T)) → U8_gga(X, F, T, =\=_in_gg(X, F))
U8_gga(X, F, T, =\=_out_gg) → U9_gga(X, F, T, =\=_in_ga(X))
U9_gga(X, F, T, =\=_out_ga) → U10_gga(X, T, =\=_in_ga(F))
=\=_in_ga(X0) → =\=_out_ga
U10_gga(X, T, =\=_out_ga) → U11_gga(X, T, is_in_aa)
U11_gga(X, T, is_out_aa) → U12_gga(noattack_in_gga(X, T))
is_in_aa → is_out_aa
U12_gga(noattack_out_gga) → noattack_out_gga
noattack_in_ggg(x0, x1, x2)
U8_ggg(x0, x1, x2, x3, x4)
=\=_in_gg(x0, x1)
U9_ggg(x0, x1, x2, x3, x4)
U10_ggg(x0, x1, x2, x3)
U11_ggg(x0, x1, x2)
is_in_ag(x0)
U12_ggg(x0)
noattack_in_gga(x0, x1)
U8_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
=\=_in_ga(x0)
U10_gga(x0, x1, x2)
U11_gga(x0, x1, x2)
is_in_aa
U12_gga(x0)
From the DPs we obtained the following set of size-change graphs:
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
queens_in_ga(X, Y) → U1_ga(X, Y, perm_in_ga(X, Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_ga(X, Y, perm_out_ga(X, Y)) → U2_ga(X, Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U8_ggg(X, F, T, N, =\=_out_gg(X, F)) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
U9_ggg(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_ggg(X, F, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_ggg(X, F, T, N, is_in_ag(N1, +(N, 1)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U11_ggg(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_ggg(X, F, T, N, noattack_in_gga(X, T, N1))
noattack_in_gga(X, [], N) → noattack_out_gga(X, [], N)
noattack_in_gga(X, .(F, T), N) → U8_gga(X, F, T, N, =\=_in_gg(X, F))
U8_gga(X, F, T, N, =\=_out_gg(X, F)) → U9_gga(X, F, T, N, =\=_in_ga(X, +(F, N)))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
U9_gga(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_gga(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_gga(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_gga(X, F, T, N, is_in_aa(N1, +(N, 1)))
is_in_aa(X0, X1) → is_out_aa(X0, X1)
U11_gga(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_gga(X, F, T, N, noattack_in_gga(X, T, N1))
U12_gga(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_gga(X, .(F, T), N)
U12_ggg(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, 1)) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_ga(X, Y, safe_out_g(Y)) → queens_out_ga(X, Y)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
DELETE_IN_AGA(.(F, T)) → DELETE_IN_AGA(T)
From the DPs we obtained the following set of size-change graphs:
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
queens_in_ga(X, Y) → U1_ga(X, Y, perm_in_ga(X, Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_ga(X, Y, perm_out_ga(X, Y)) → U2_ga(X, Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, 1))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, =\=_in_gg(X, F))
=\=_in_gg(X0, X1) → =\=_out_gg(X0, X1)
U8_ggg(X, F, T, N, =\=_out_gg(X, F)) → U9_ggg(X, F, T, N, =\=_in_gg(X, +(F, N)))
U9_ggg(X, F, T, N, =\=_out_gg(X, +(F, N))) → U10_ggg(X, F, T, N, =\=_in_gg(F, +(X, N)))
U10_ggg(X, F, T, N, =\=_out_gg(F, +(X, N))) → U11_ggg(X, F, T, N, is_in_ag(N1, +(N, 1)))
is_in_ag(X0, X1) → is_out_ag(X0, X1)
U11_ggg(X, F, T, N, is_out_ag(N1, +(N, 1))) → U12_ggg(X, F, T, N, noattack_in_gga(X, T, N1))
noattack_in_gga(X, [], N) → noattack_out_gga(X, [], N)
noattack_in_gga(X, .(F, T), N) → U8_gga(X, F, T, N, =\=_in_gg(X, F))
U8_gga(X, F, T, N, =\=_out_gg(X, F)) → U9_gga(X, F, T, N, =\=_in_ga(X, +(F, N)))
=\=_in_ga(X0, X1) → =\=_out_ga(X0, X1)
U9_gga(X, F, T, N, =\=_out_ga(X, +(F, N))) → U10_gga(X, F, T, N, =\=_in_ga(F, +(X, N)))
U10_gga(X, F, T, N, =\=_out_ga(F, +(X, N))) → U11_gga(X, F, T, N, is_in_aa(N1, +(N, 1)))
is_in_aa(X0, X1) → is_out_aa(X0, X1)
U11_gga(X, F, T, N, is_out_aa(N1, +(N, 1))) → U12_gga(X, F, T, N, noattack_in_gga(X, T, N1))
U12_gga(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_gga(X, .(F, T), N)
U12_ggg(X, F, T, N, noattack_out_gga(X, T, N1)) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, 1)) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_ga(X, Y, safe_out_g(Y)) → queens_out_ga(X, Y)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)
PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))
delete_in_aga(.(X, Y)) → delete_out_aga(X, Y)
delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))
delete_in_aga(x0)
U5_aga(x0, x1)
U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)
PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))
delete_in_aga(.(X, Y)) → delete_out_aga(X, Y)
delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))
.2 > deleteinaga1 > U5aga2 > U3GA1 > PERMINGA1 > deleteoutaga2
delete_in_aga_1=1
U3_GA_1=1
PERM_IN_GA_1=3
._2=0
delete_out_aga_2=1
U5_aga_2=0
delete_in_aga(x0)
U5_aga(x0, x1)